package com.ostrich.a2104gao5.test23

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/17 13:33
 * @Description : Book
 * vararg:泛型类中可以一次性放多个实例
 */
class Book<T>(vararg item: T) {
    var data:Array<out T> = item
}

fun main(){
    val book:Book<String> = Book("a","v","b")
    book.data.forEach {
        println(it)
    }
}